package com.example.yixueban.mapper;

import com.example.yixueban.domain.User;
import com.example.yixueban.domain.UserExample;
import com.example.yixueban.resp.login.AccountInfo_resp;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;


/**
 * User: Wang YiHan
 * Date: 2021/8/5 21:44
 * Email: 783096044@qq.com
 * File_Name: UserMapper
 **/
@Mapper
@Repository
public interface UserMapper {
    long countByExample(UserExample example);

    int deleteByExample(UserExample example);

    int deleteByPrimaryKey(Integer userId);

    int insert(User record);

    int insertSelective(User record);

    List<User> selectByExample(UserExample example);

    User selectByPrimaryKey(Integer userId);

    int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);

    int updateByExample(@Param("record") User record, @Param("example") UserExample example);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    List<User> getAllUsers();

    AccountInfo_resp userLogin( @Param("number") String number,@Param("pwd") String pwd);

    int userRegister(@Param("number") String number,@Param("pwd") String pwd);


    User selectByUser_number(String userInputNumber);
}